package com.iplant.ams.serviceImpl.dao.dms.scada;

import com.iplant.ams.service.po.dms.scada.alarm.DMSDeviceCurrentAlarm;
import com.iplant.ams.service.po.dms.scada.status.DMSDeviceHisStatus;
import com.iplant.base.po.OutResult;
import com.iplant.base.po.Pagination;
import com.iplant.base.utils.annotation.dao.DBBaseDAO;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import lombok.extern.slf4j.Slf4j;

import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@DBBaseDAO(DMSDeviceHisStatus.class)
@Slf4j
public class DMSDeviceHisStatusDAO extends BaseDAO {

    private static DMSDeviceHisStatusDAO Instance = null;

    public static DMSDeviceHisStatusDAO getInstance() {
        if (Instance == null) {
            Instance = new DMSDeviceHisStatusDAO();
        }
        return Instance;
    }

    public DMSDeviceHisStatusDAO() {
        super("");
        this.Init();
    }

    public List<DMSDeviceHisStatus> DMS_SelectDeviceHisStatusList(BMSEmployee wLoginUser,
                                                                  List<String> wAssetNoList, int wActive,
                  Calendar wStartTime, Calendar wEndTime, Pagination wPagination, OutResult<Integer> wErrorCode) {
        Map<String, Object> wParams = new HashMap<>();
        wParams.put("AssetNo", wAssetNoList);
        wParams.put("Active", wActive);
        wParams.put("StartTime", wStartTime);
        wParams.put("EndTime", wEndTime);
        return this.SelectPOList(wLoginUser, wParams, wPagination, wErrorCode);
    }


}
